package com.xiaodu.acer.phoneplay.di.module;

import com.xiaodu.acer.phoneplay.data.MainModel;
import com.xiaodu.acer.phoneplay.data.http.ApiService;
import com.xiaodu.acer.phoneplay.di.FragmentScope;
import com.xiaodu.acer.phoneplay.presenter.contract.MainContract;

import dagger.Module;
import dagger.Provides;

/**
 * @author 小杜
 *         邮箱:m15701207383@163.com
 * @version V1.0
 * @Description: ${TODO}(用一句话描述该文件做什么)
 * @date 2018/1/9 15:07
 */
@Module
public class MainModule {

    private MainContract.View mView;

    public MainModule(MainContract.View view) {
        this.mView = view;
    }

    @FragmentScope
    @Provides
    public MainContract.View providesMainView() {
        return mView;
    }

    @FragmentScope
    @Provides
    public MainContract.Model provideModel(ApiService apiService){
        return  new MainModel(apiService);
    }



}
